<!doctype html>
<html>

<head>
    <meta charset="UTF-8">
    <link href="http://cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.css" rel="stylesheet">
    <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
    <script src="http://cdn.bootcss.com/angular.js/1.5.7/angular.min.js"></script>
    <script src="js/orders.js"></script>
    <script>
        function fuckIE() {
            document.body.style.padding = '20';
            document.body.style.fontSize = '16px';
            document.body.innerHTML = '您的浏览器大概是IE内核，请换个谷歌内核的浏览器再来吧！</br>咱是互联网公司，浏览器不要用那么low';
        }
    </script>
</head>

<body ng-app="myApp" ng-controller="orders" ng-show="isLogin">
<div class="container" style="width: 591px;">
    <div class="row" style="margin-top: 30px;">
        <h4>KFC点餐辅助记账系统3.0</h4>
    </div>
</div>
<div class="container" style="width: 591px;" ng-show="showOrders">
    <div class="row" style="margin-top: 10px;">
        <button style="float: left;" type="button" class="btn btn-sm btn-primary" ng-click="goIndex()">
            返回首页
        </button>
    </div>
    <div class="row" style="margin-top: 15px;">
        <div class="list-group">
            <a href="javascript:void(0);" class="list-group-item" ng-repeat="order in orders">
                <div style="float: left;"> {{order.createTime | date: 'yyyy-MM-dd hh:mm:ss'}}</div>
                <button style="float: right;" type="button" class="btn btn-xs btn-primary" ng-click="goOrder(order)">
                    去看
                </button>
                <div style="float: right; margin-right: 10px;">最终价格：{{order.final}} 元</div>
                <div style="clear: both;"></div>
            </a>
        </div>
    </div>
</div>
<div class="container" style="width: 591px;" ng-hide="showOrders">
    <div class="row" style="margin-top: 10px;">
        <button style="float: left;" type="button" class="btn btn-sm btn-primary" ng-click="goOrders()">
            返回
        </button>
    </div>
    <div class="row" style="margin-top: 15px;">
        <div class="list-group">
            <a href="javascript:void(0);" class="list-group-item" ng-repeat="user in users">
                <div style="float: left;"> {{user.userName}}</div>
                <button style="float: right;" type="button" class="btn btn-xs btn-danger" ng-click="pay(user)"
                        ng-show="!user.isPay">
                    付款
                </button>
                <span style="float: right;" class="text-success" ng-show="user.isPay">
                    已付款
                </span>
                <button style="float: right; margin-right: 10px;" type="button" class="btn btn-xs btn-default">
                    {{user.finalPrice || 0}}&nbsp;元
                </button>
                <div style="clear: both;"></div>
                <div class="list-group" style="margin-top: 0px; margin-bottom: 0px;" ng-show="true">
                    <div class="label label-info" style="float:left; margin-right: 5px; margin-top: 5px;"
                         ng-repeat="it in user.its">{{it.name}} * {{it.num}}
                    </div>
                </div>
                <div style="clear: both;"></div>
            </a>
        </div>
    </div>
    <div class="row" style="margin-top: 0px;">
        <label class="col-md-12" style="padding-left: 0px; line-height: 34px;">
            当前总价&nbsp;<span>{{totalPrice}}</span>&nbsp;元，当前运费&nbsp;<span>{{freight}}</span>&nbsp;元，合计&nbsp;<span
                class="text-danger">{{finalPrice}}</span>&nbsp;元
        </label>
    </div>
</div>
</body>
<!--[if lte IE 9 ]>
<script>fuckIE();</script>
<![endif]-->
</html>